# Maintainer: Christian Rebischke <chris.rebischke@archlinux.org>
# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
# Contributor: Johannes Wienke <languitar@semipol.de>
pkgname=xsecurelock
pkgver=1.8.0
pkgrel=1
pkgdesc="X11 screen lock utility with security in mind"
arch=('loong64' 'x86_64')
url="https://github.com/google/xsecurelock"
license=('APACHE')
depends=('pam' 'libxcomposite' 'libxmu' 'libxft' 'libxrandr' 'libxss')
makedepends=('mplayer' 'mpv' 'imagemagick' 'xorg-xset' 'xscreensaver')
optdepends=('mplayer: for the saver_mplayer module'\
            'mpv: for the saver_mpv module'\
            'imagemagick: for the auth_pamtester module'\
            'pamtester: for the auth_pamtester module'\
            'xorg-xset: for the saver_blank module'\
            'xscreensaver: for the saver_xscreensaver module')
source=("https://github.com/google/xsecurelock/archive/v${pkgver}.tar.gz")
sha512sums=('c98aa9e5a5574a90a8b0cb8d41b67489c34689b489b9a079aa16493435d9dafdc090ac2e8ba5fa766d6ce2b3ee8ff12c09caa9eb851359be315f9d14563c8556')

build() {
    cd "${pkgname}-${pkgver}"
    sh autogen.sh
    ./configure --prefix=/usr \
                --libexecdir=/usr/lib \
                --with-pam-service-name=system-auth
    make GIT_VERSION="${pkgver}"
}

package() {
    cd "${pkgname}-${pkgver}"
    make DESTDIR="${pkgdir}" install
}

# vim:set ts=4 sw=4 et:
